<template>
  <view>
    <web-view :src="url"></web-view>
  </view>
</template>

<script setup>
import { onLoad } from '@dcloudio/uni-app';
import { ref } from 'vue';
import { useCounter } from '@/mixins/userHooks';
const { tool, userInfo } = useCounter();
console.log('【token8888888888】', tool.storage('token').token)
// const url = ref(`https://cdn1.vrupup.com/s/1407/f/index.html#/?token=${tool.storage('token').token}&name=${userInfo.value.nickname || '禧栻用户'}&`); //正式环境
const url = ref(`https://cdn1.vrupup.com/s/1407_test/f/index.html#/?token=${tool.storage('token').token}&name=${userInfo.value.nickname || '禧栻用户'}&`); //测试环境
onLoad((options) => {
  if (options.survey_id) url.value += `survey_id=${options.survey_id}`;
  if (options.jj_id) url.value += `jj_id=${options.jj_id}`;
  if (options.diy_id) url.value += `diy_id=${options.diy_id}`;
  // if (options.product_id) url.value = `https://cdn1.vrupup.com/s/1407/f/index.html#/intro?token=${tool.storage('token').token}&product_id=${options.product_id}`; //正式环境
  if (options.product_id) url.value = `https://cdn1.vrupup.com/s/1407_test/f/index.html#/intro?token=${tool.storage('token').token}&product_id=${options.product_id}`; //测试环境
});
</script>

<style lang="scss"></style>
